The present invention has particular applications to flowmeters, such as vortex shedding meters or swirlmeters which are responsive to a fluid flow. The present invention relates to ascertaining a transfer function of a digital filter used in such meters and in other process instruments.
Flowmeters sense the flow of liquids or gasses in conduits and produce a signal indicative of the flow. Under certain circumstances, the presence of an obstacle known alternatively as a shedding bar, bluff body, or vortex generator, in a flow conduit causes periodic vortices in the flow. The frequency of these vortices is directly proportional to the flow velocity in the flowmeter. The shedding vortices produce an alternating differential pressure across the bluff body at the shedding frequency. This differential pressure is converted to an electrical signal by piezoelectric crystals or other differential pressure devices. The magnitude of the differential pressure or electric signal is proportional to .rho.V.sup.2, where .rho. is the fluid density and V is the fluid velocity. When the ratio of pipe diameter to the size of the bluff body is held constant, the signal magnitude is proportional to .rho.D.sup.2 F.sup.2, where D is the inside diameter of the metering pipe and F is the shedding frequency. The vortex flowmeter produces pulses having a frequency proportional to the flow rate. In a swirlmeter, the fluid whose flow rate is to be measured is forced to assume a swirl component by means of swirl blades, the arrangement being such that the swirling motion is transformed into precessional movement to produce fluidic pulses which are sensed to yield a signal whose frequency is proportional to flow rate. See e.g., U.S. Pat. Nos. 3,616,693 and 3,719,080 which disclose examples of swirlmeters and are hereby incorporated by reference. As used herein "vortex flowmeter" shall include both vortex shedding meters and swirlmeters.
A vortex flowmeter can also calculate the mass flow rate through the pipe or conduit. U.S. Pat. No. 5,429,001 discloses a method and apparatus for calculating mass flow based upon amplitude and frequency of a filtered output. A filter in the vortex flowmeter receives an input signal related to flow having a fundamental frequency varying responsively to flow. The filter filters the input signal with a selected high pass (HP) filter characteristic and preset low pass (LP) filters to produce the filtered signal having a frequency representative of flow. The frequency characteristic of the HP filter is selected from a family of preselected HP filters having varying corner frequencies. Each HP filter in the family has a unique switch-up and a unique switch-down value assigned to it.
The vortex flowmeter disclosed in U.S. Pat. No. 5,429,001 also includes an adaptive response circuit which selects a current HP filter characteristic for use in the filter. The adaptive circuit uses one selection method when the flow is increasing and another selection method when the flow is decreasing. Calculation circuitry in the vortex flowmeter includes rectifying circuitry, summing circuitry, period counting and timing circuitry and a microprocessor. The rectifying circuit rectifies the filtered signal and the summing circuitry sums the magnitude of the rectified output while the period counting and timing circuitry counts periods and elapse time of the counted periods in the filtered output. The microprocessor calculates mass flow using the frequency and average amplitude of the filtered output based upon outputs from the summing circuitry, period counting circuitry and a system clock.
In a preferred embodiment, calculation of mass flow is corrected for error in the filtered output due to the transfer function of the digital filter. U.S. Pat. No. 5,429,001 discloses an equation of the frequency response transfer function for each of the individual filters. The microprocessor calculates mass flow using the filtered output signal with a correction factor due to the transfer function of each filter. However, since the transfer function varies due to changing corner frequencies provided by the microprocessor, the microprocessor must recalculate the transfer function of each filter in order to apply an accurate correction factor. Thus, for each calculation of mass flow rate, the microprocessor must perform many mathematical steps wherein each mathematical step requires a number of clock cycles. This limits the rate at which calculated mass flow rates can be provided, or limits what other functions the microprocessor can perform between calculated mass flow rates. It is, therefore, desirable to shorten the computational time necessary for the vortex flowmeter to compute the mass flow rate.